
*********************************************************		
* Replication file for Tables in Paper and Appendix: child level regressions
* Kosec, Katrina and Olga Shemyakina. 2022. “Child Health and Land Reform in Kyrgyzstan*
* Economic Development and Cultural Change 2022 *
	* Katrina Kosec, International Food Policy Research Institute, k.kosec@cgiar.org
	* Olga Shemyakina, School of Economics, Georgia Institute of Technology, olga.shemyakina@econ.gatech.edu
*********************************************************		



*REPLICATION - 01/28/2022*
* this do-file includes replication files for regression tables based on child-level data 
//this file includes regression data for Child-Parent file for LSMS 93/96/97/98"
//definition of "months of exposed to land reform" is based on child's date of birth and defined in Table 1//

	*set path/folder for regression tables NEW
	*set the path
	**cd C:\....\
	*create sub-folder for output results: mkdir "03_results"
	
	
	*data file*	
	use "$root/EDCC_child_community.dta", clear
	

**********************************************************************************************************
* MAIN PAPER TABLES: T2, T4, T5, T6, T10, T11, T12 - all child level data
***********************************************************************************************************
set more off
	* Table 2 - summary stats: run the summary stats and create the table with results in Stata
	global head_cb  hhage hhfem hhmarried hh_e_kyrgyz hh_e_russian hh_e_uzbek
	
	* Full sample
	sum hazall waz06 whz06 ///
			in_utero exposed ov_exposed age_months child_fem child_y_birth ///
			$head_cb hh_e_other ///
			dmhasland hectland born_b1995 if dm_urban==0, sep(0)
	* by year
	bysort year: sum hazall waz06 whz06  ///
			in_utero exposed ov_exposed age_months child_fem child_y_birth ///
			$head_cb hh_e_other ///
			dmhasland hectland born_b1995 if dm_urban==0, sep(0)
	* var labels
	d hazall waz06 whz06 ///
			in_utero exposed ov_exposed age_months child_fem child_y_birth ///
			$head_cb hh_e_other ///
			dmhasland hectland born_b1995

	estpost tabstat hazall waz06 whz06  ///
			in_utero exposed ov_exposed age_months child_fem child_y_birth ///
			$head_cb hh_e_other ///
			dmhasland hectland born_b1995 if dm_urban==0, by(year)  s(count mean) col(stat)
		
	esttab . using "$out_folder\Table2_paper.csv", cells("count(label(Obs.) fmt(0)) Mean(label(Mean) fmt(2)) ") title("Summary Statistics- Table 2")  nomtitle nonumber noobs replace

*********************************************************************
*REGRESSION TABLES
*baseline oblast is "oblast_int=2==Issyk-Kul" for rural sample

*specify controls*
global child_c ov_exposed child_fem  
global trend_c ob3-ob7 i.age_months
global head_cb hhage hhfem hhmarried hh_e_kyrgyz hh_e_russian hh_e_uzbek
global year_c surv96  surv97 surv98

set more off


	
	
	*TABLE 4 - Effect of exposure to land privatization on child anthropometrics*
	
	xi: quietly reg hazall $child_c $year_c  $trend_c $head_cb if dm_urban==0 & age_months<=60, robust cluster(child_y_birth)
	estimates store m1, title(HAZ: 0-60m)
	outreg2 using "$out_folder\Table4_paper.xls", replace dec(3) cttop(HAZ: 0-60m)

	xi: quietly  reg hazall $child_c $year_c  $trend_c $head_cb if dm_urban==0 & age_months<=24, robust cluster(child_y_birth)               
	estimates store m2, title(HAZ: 0-24m)
	outreg2 using "$out_folder\Table4_paper.xls", dec(3) cttop(HAZ: 0-24m)

	xi: quietly  reg hazall $child_c $year_c  $trend_c $head_cb if dm_urban==0 & age_months>24 & age_months<=60, robust cluster(child_y_birth)               
	estimates store m3, title(HAZ: 25-60m)
	outreg2 using "$out_folder\Table4_paper.xls",  dec(3) cttop(HAZ: 25-60m)
	****

	xi: quietly  reg waz06 $child_c $year_c  $trend_c $head_cb if dm_urban==0 & age_months<=60, robust cluster(child_y_birth)
	estimates store m11, title(WAZ: 0-60m)
	outreg2 using "$out_folder\Table4_paper.xls", dec(3) cttop(WAZ: 0-60m)

	xi: quietly  reg waz06 $child_c $year_c  $trend_c $head_cb if dm_urban==0 & age_months<=24, robust cluster(child_y_birth)               
	estimates store m12, title(WAZ: 0-24m)
	outreg2 using "$out_folder\Table4_paper.xls", dec(3) cttop(WAZ: 0-24m)

	xi: quietly  reg waz06 $child_c $year_c  $trend_c $head_cb if dm_urban==0 & age_months>24 & age_months<=60, robust cluster(child_y_birth)               
	estimates store m13, title(WAZ: 25-60m)
	outreg2 using "$out_folder\Table4_paper.xls", dec(3) cttop(WAZ: 25-60m)
	****

	xi: quietly  reg whz06 $child_c $year_c  $trend_c $head_cb if dm_urban==0 & age_months<=60, robust cluster(child_y_birth)
	estimates store m21, title(WHZ: 0-60m)
	outreg2 using "$out_folder\Table4_paper.xls",  dec(3) cttop(WHZ: 0-60m)

	xi: quietly  reg whz06 $child_c $year_c  $trend_c $head_cb if dm_urban==0 & age_months<=24, robust cluster(child_y_birth)               
	estimates store m22, title(WHZ: 0-24m)
	outreg2 using "$out_folder\Table4_paper.xls",  dec(3) cttop(WHZ: 0-24m)

	xi: quietly  reg whz06 $child_c $year_c  $trend_c $head_cb if dm_urban==0 & age_months>24 & age_months<=60, robust cluster(child_y_birth)               
	estimates store m23, title(WHZ: 25-60m)
	outreg2 using "$out_folder\Table4_paper.xls",  dec(3) cttop(WHZ: 25-60m)


	*TABLE 5 - Effect of exposure to land privatization on child anthropometrics, by gender *
		
	*define controls*
	global child_c ov_exposed child_fem  
	global trend_c ob3-ob7 i.age_months
	global head_cb hhage hhfem hhmarried hh_e_kyrgyz hh_e_russian hh_e_uzbek
	global year_c surv96  surv97 surv98
	
	**all regressions now include interaction btw exposure and gender
	global child_c1 ov_exposed child_fem exp_fem
		
	*HAZ*
	xi: quietly  reg hazall $child_c1 $year_c  $trend_c $head_cb if dm_urban==0 & age_months<=60, robust cluster(child_y_birth)
	estimates store m11, title(HAZ: 0-60m)
	outreg2 using "$out_folder\Table5_paper.xls", replace dec(3) cttop(HAZ: 0-60m)

	xi: quietly  reg hazall $child_c1 $year_c  $trend_c $head_cb if dm_urban==0 & age_months<=24, robust cluster(child_y_birth)
	estimates store m12, title(HAZ: 0-24m)
	outreg2 using "$out_folder\Table5_paper.xls", dec(3) cttop(HAZ: 0-24m)

	xi: quietly  reg hazall $child_c1 $year_c  $trend_c $head_cb if dm_urban==0 & age_months>25 & age_months<=60, robust cluster(child_y_birth)
	estimates store m13, title(HAZ: 25-60m)
	outreg2 using "$out_folder\Table5_paper.xls", dec(3) cttop(HAZ: 25-60m)

	*WAZ*
	**************************************
	xi: quietly  reg waz06 $child_c1 $year_c  $trend_c  $head_cb if dm_urban==0 & age_months<=60, robust cluster(child_y_birth)
	estimates store m21, title(WAZ: 0-60m)
	outreg2 using "$out_folder\Table5_paper.xls",  dec(3) cttop(WAZ: 0-60m)

	xi: quietly  reg waz06 $child_c1 $year_c  $trend_c $head_cb  if dm_urban==0 & age_months<=24, robust cluster(child_y_birth)
	estimates store m22, title(WAZ: 0-24m)
	outreg2 using "$out_folder\Table5_paper.xls", dec(3) cttop(WAZ: 0-24m)

	xi: quietly  reg waz06 $child_c1 $year_c  $trend_c $head_cb  if dm_urban==0 & age_months>25 & age_months<=60, robust cluster(child_y_birth)
	estimates store m23, title(WAZ: 25-60m)
	outreg2 using "$out_folder\Table5_paper.xls", dec(3) cttop(WAZ: 25-60m)


	*TABLE 6 - MEDIAN EXPENDITURE WITH CONTROLS*

	set more off

	*define controls* - as in Table 4
	global child_c ov_exposed child_fem  
	global trend_c ob3-ob7 i.age_months
	global head_cb hhage hhfem hhmarried hh_e_kyrgyz hh_e_russian hh_e_uzbek
	global year_c surv96  surv97 surv98

	*HAZ*
	xi: quietly  reg hazall $child_c $year_c $head_cb $trend_c belme below_med if dm_urban==0 & age_months<=60, robust cluster(child_y_birth)
		outreg2 using "$out_folder\Table6_paper.xls", replace dec(3) cttop(HAZ: 0-60m)
		estimates store m11, title(HAZ: 0-60m)

	xi: quietly  reg hazall $child_c $year_c $head_cb $trend_c belme below_med  if dm_urban==0 & age_months<=24, robust cluster(child_y_birth)               
		outreg2 using "$out_folder\Table6_paper.xls", dec(3) cttop(HAZ: 0-24m)
		estimates store m12, title(HAZ: 0-24m)

	xi: quietly  reg hazall $child_c $year_c $head_cb  $trend_c belme below_med  if dm_urban==0 & age_months>24 & age_months<=60, robust cluster(child_y_birth)               
		outreg2 using "$out_folder\Table6_paper.xls", dec(3) cttop(HAZ: 25-60m)
		estimates store m13, title(HAZ: 25-60m)

	*WAZ*

	xi: quietly  reg waz06 $child_c $year_c $head_cb  $trend_c belme below_med  if dm_urban==0 & age_months<=60, robust cluster(child_y_birth) 
		outreg2 using "$out_folder\Table6_paper.xls", dec(3) cttop(WAZ: 0-60m)
		estimates store m21, title(WAZ: 0-60m)

	xi: quietly  reg waz06 $child_c $year_c $head_cb $trend_c belme below_med  if dm_urban==0 & age_months<=24, 	robust cluster(child_y_birth)               
		outreg2 using "$out_folder\Table6_paper.xls", dec(3) cttop(WAZ: 0-24m)
		estimates store m22, title(WAZ: 0-24m)

	xi: quietly reg waz06 $child_c $year_c $head_cb $trend_c belme below_med  if dm_urban==0 & age_months>24 & age_months<=60, robust cluster(child_y_birth)               
		outreg2 using "$out_folder\Table6_paper.xls", dec(3) cttop(WAZ: 25-60m)
		estimates store m23, title(WAZ: 25-60m)

		

***********************************************************************		
*** TABLE A7 and TABLE 10***

*defining community variables groups*
	
		//infrastructure
		global comm_i i_road i_postoffice i_pubphone i_locnews i_firebrig i_centwater i_centsewer i_centgarb i_pubsch 
		
		//open mkt
		global comm_o o_prest  o_pbank
		
		//govnt services
		global comm_g g_hospital g_clinic g_pediatr g_childc o_emplof

//define a set of controls: child/ hhd/ year of birth//

	global head_cb hhage hhfem hhmarried hh_e_kyrgyz hh_e_russian hh_e_uzbek
	global child_c ov_exposed child_fem  
	global year_c   surv96 surv97 surv98
	global trend_c ob3-ob7 i.age_months
	global year_c1  surv97 surv98

*Table A7 - community characteristics at the child level and year
* see in results window and copy-paste

	bysort year: sum $comm_i $comm_o $comm_g if dm_urban==0 & age_months<=60 & no96==1, sep(0)
		
	estpost tabstat $comm_i $comm_o $comm_g if dm_urban==0 & age_months<=60 & no96==1, by(year)  s(count mean) col(stat)
		
	esttab . using "$out_folder\TableA7.csv", cells("count(label(N) fmt(0)) Mean(label(Mean) fmt(2)) ") title("Summary Statistics- Table A7")  nomtitle nonumber noobs replace

*Table 10: Effect of exposure to land privatization on child anthropometrics, including community controls

* Panel A - including controls for community infrastructure

xi: quietly  reg hazall $child_c $year_c1  $trend_c $head_cb $comm_i if dm_urban==0 & age_months<=60 & no96==1, robust cluster(child_y_birth) 
	outreg2 using "$out_folder\Table10.xls", replace dec(3) cttop(A.HAZ: 0-60m)
		estimates store m1, title(A.HAZ: 0-60m)

xi:  quietly reg hazall $child_c $year_c1  $trend_c $head_cb $comm_i if dm_urban==0 & age_months<=24 & no96==1, robust cluster(child_y_birth) 
	outreg2 using "$out_folder\Table10.xls", dec(3) cttop(A.HAZ:0-24m)
		estimates store m2, title(A.HAZ: 0-24m)
		
xi: quietly  reg hazall $child_c $year_c1  $trend_c $head_cb $comm_i if dm_urban==0 & age_months>24 & age_months<=60 & no96==1, robust cluster(child_y_birth)               
	outreg2 using "$out_folder\Table10.xls", dec(3) cttop(A.HAZ: 25-60m)
		estimates store m3, title(A.HAZ: 25-60m)
	****

xi: quietly reg waz06 $child_c $year_c1  $trend_c $head_cb $comm_i if dm_urban==0 & age_months<=60 & no96==1, robust cluster(child_y_birth)
	outreg2 using "$out_folder\Table10.xls", dec(3) cttop(A.WAZ: 0-60m)
		estimates store m4, title(A.WAZ: 0-60m)

xi: quietly reg waz06 $child_c $year_c1  $trend_c $head_cb $comm_i if dm_urban==0 & age_months<=24 & no96==1, robust cluster(child_y_birth)               
	outreg2 using "$out_folder\Table10.xls", dec(3) cttop(A.WAZ: 0-24m)
		estimates store m5, title(A.WAZ: 0-24m)

xi:  quietly  reg waz06 $child_c $year_c1  $trend_c $head_cb $comm_i if dm_urban==0 & age_months>24 & age_months<=60 & no96==1, robust cluster(child_y_birth)               
	outreg2 using "$out_folder\Table10.xls", dec(3) cttop(A.WAZ: 25-60m)
		estimates store m6, title(A.WAZ: 25-60m)

	** Panel B - including controls for community access to government services 
	***
	
	*HAZ*
	xi: quietly reg hazall $child_c $year_c1  $trend_c $head_cb $comm_g if dm_urban==0 & age_months<=60 & no96==1, robust cluster(child_y_birth) 
	outreg2 using "$out_folder\Table10.xls", dec(3) cttop(B.HAZ: 0-60m)
	estimates store m11, title(B.HAZ: 0-60m)

	xi: quietly reg hazall $child_c $year_c1  $trend_c $head_cb $comm_g if dm_urban==0 & age_months<=24 & no96==1, robust cluster(child_y_birth) 
	outreg2 using "$out_folder\Table10.xls", dec(3) cttop(B.HAZ: 0-24M)
	estimates store m12, title(B.HAZ: 0-24m)

	xi: quietly reg hazall $child_c $year_c1  $trend_c $head_cb $comm_g if dm_urban==0 & age_months>24 & age_months<=60 & no96==1, robust cluster(child_y_birth)               
	outreg2 using "$out_folder\Table10.xls", dec(3) cttop(B.HAZ: 25-60M)
	estimates store m13, title(B.HAZ: 25-60m)
	***
	*WAZ*
	xi: quietly  reg waz06 $child_c $year_c1  $trend_c $head_cb $comm_g if dm_urban==0 & age_months<=60 & no96==1, robust cluster(child_y_birth)
	outreg2 using "$out_folder\Table10.xls", dec(3) cttop(B.WAZ: 0-60M)
	estimates store m14, title(B.WAZ: 0-60m)

	xi: quietly  reg waz06 $child_c $year_c1  $trend_c $head_cb $comm_g if dm_urban==0 & age_months<=24 & no96==1, robust cluster(child_y_birth)               
	outreg2 using "$out_folder\Table10.xls", dec(3) cttop(B.WAZ: 0-24M)
	estimates store m15, title(B.WAZ: 0-24m)

	xi: quietly  reg waz06 $child_c $year_c1 $trend_c $head_cb $comm_g if dm_urban==0 & age_months>24 & age_months<=60 & no96==1, robust cluster(child_y_birth)               
	outreg2 using "$out_folder\Table10.xls", dec(3) cttop(B.WAZ: 25-60M)
	estimates store m16, title(B.WAZ: 25-60m)
	
	****Panel C - including controls for private enterprise (open mkt)
	*HAZ*
	xi: quietly reg hazall $child_c $year_c1  $trend_c $head_cb $comm_o if dm_urban==0 & age_months<=60 & no96==1, robust cluster(child_y_birth) 
	outreg2 using "$out_folder\Table10.xls", dec(3) cttop(C.HAZ: 0-60M)
		estimates store m21, title(C.HAZ: 0-60m)

	xi: quietly reg hazall $child_c $year_c1  $trend_c $head_cb $comm_o if dm_urban==0 & age_months<=24 & no96==1, robust cluster(child_y_birth) 
	outreg2 using "$out_folder\Table10.xls", dec(3) cttop(C.HAZ: 0-24)
		estimates store m22, title(C.HAZ: 0-24m)
		
	xi: quietly reg hazall $child_c $year_c1  $trend_c $head_cb $comm_o if dm_urban==0 & age_months>24 & age_months<=60 & no96==1, robust cluster(child_y_birth)               
	outreg2 using "$out_folder\Table10.xls", dec(3) cttop(C.HAZ: 25-60)
		estimates store m23, title(C.HAZ: 25-60m)

	* WAZ*

	xi: quietly  reg waz06 $child_c $year_c1  $trend_c $head_cb $comm_o if dm_urban==0 & age_months<=60 & no96==1, robust cluster(child_y_birth)
	outreg2 using "$out_folder\Table10.xls", dec(3) cttop(C.WAZ: 0-60)
		estimates store m24, title(C.WAZ: 0-60m)

	xi: quietly reg waz06 $child_c $year_c1  $trend_c $head_cb $comm_o if dm_urban==0 & age_months<=24 & no96==1, robust cluster(child_y_birth)               
	outreg2 using "$out_folder\Table10.xls", dec(3) cttop(C.WAZ: 0-24)
		estimates store m25, title(C.WAZ: 0-24m)
		
	xi: quietly reg waz06 $child_c $year_c1  $trend_c $head_cb $comm_o if dm_urban==0 & age_months>24 & age_months<=60 & no96==1, robust cluster(child_y_birth)               
	outreg2 using "$out_folder\Table10.xls", dec(3) cttop(C.WAZ: 25-60)
		estimates store m26, title(C.WAZ: 25-60m)

	** Panel D - including all community-level controls (from panels A-C)
	
	
	//All community controls: infrastructure+open mkt+govnt services
	global comm_a i_road i_postoffice i_pubphone i_locnews i_firebrig i_centwater i_centsewer i_centgarb i_pubsch ///
			o_prest o_emplof o_pbank g_hospital g_clinic g_pediatr g_childc
	
	global comm_a $comm_i $comm_o $comm_g
	
	*HAZ*
	xi: quietly reg hazall $child_c $year_c1  $trend_c $head_cb $comm_a  if dm_urban==0 & age_months<=60 & no96==1, robust cluster(child_y_birth) 
	outreg2 using "$out_folder\Table10.xls", dec(3) cttop(D.HAZ: 0-60)
		estimates store m31, title(D.HAZ: 0-60m)

	xi: quietly reg hazall $child_c $year_c1  $trend_c $head_cb $comm_a if dm_urban==0 & age_months<=24 & no96==1, robust cluster(child_y_birth) 
	outreg2 using "$out_folder\Table10.xls", dec(3) cttop(D.HAZ: 0-24)
		estimates store m32, title(D.HAZ: 0-24m)

	xi: quietly  reg hazall $child_c $year_c1  $trend_c $head_cb $comm_a if dm_urban==0 & age_months>24 & age_months<=60 & no96==1, robust cluster(child_y_birth)               
	outreg2 using "$out_folder\Table10.xls", dec(3) cttop(D.HAZ: 25-60)
		estimates store m33, title(D.HAZ: 25-60m)

	*WAZ*
	xi: quietly  reg waz06 $child_c $year_c1  $trend_c $head_cb $comm_a if dm_urban==0 & age_months<=60 & no96==1, robust cluster(child_y_birth)
	outreg2 using "$out_folder\Table10.xls", dec(3) cttop(D.WAZ: 0-60)
		estimates store m34, title(D.WAZ: 0-60m)

	xi: quietly  reg waz06 $child_c $year_c1  $trend_c $head_cb $comm_a if dm_urban==0 & age_months<=24 & no96==1, robust cluster(child_y_birth)               
	outreg2 using "$out_folder\Table10.xls", dec(3) cttop(D.WAZ: 0-24)
		estimates store m35, title(D.WAZ: 0-24m)

	xi: quietly  reg waz06 $child_c $year_c1  $trend_c $head_cb $comm_a if dm_urban==0 & age_months>24 & age_months<=60 & no96==1, robust cluster(child_y_birth)               
	outreg2 using "$out_folder\Table10.xls", dec(3) cttop(D.WAZ: 25-60)
		estimates store m36, title(D.WAZ: 25-60m)


		* TABLE 11: Effect of exposure to land privatization on child anthropometrics, omitting Issyk-Kul oblast (region with Kumtor gold mine)*
		
		*define a set of controls: child/ hhd/ year of birth//

		global head_cb  hhage hhfem hhmarried hh_e_kyrgyz hh_e_russian hh_e_uzbek
		global child_c  ov_exposed child_fem 
		global year_c   surv96 surv97 surv98
		global year_c1  surv97 surv98
					
		//redefine trend_c - no Issyk Kul (omitted category now is ob3 Jalal Abad	=3)
		global trend_c1  i.age_months ob4-ob7
		
		xi: quietly  reg hazall $child_c $year_c  $trend_c1 $head_cb if dm_urban==0 & age_months<=60 & oblast_int>=3, robust cluster(child_y_birth) 
			outreg2 using "$out_folder\Table11.xls", replace dec(3) cttop(HAZ: 0-60)
			estimates store m11, title(HAZ: 0-60m)
				
		xi: quietly  reg hazall $child_c $year_c  $trend_c1 $head_cb if dm_urban==0 & age_months<=24 & oblast_int>=3, robust cluster(child_y_birth) 
			outreg2 using "$out_folder\Table11.xls", dec(3) cttop(HAZ: 0-24)
			estimates store m12, title(HAZ: 0-24m)
				
		xi: quietly reg hazall $child_c $year_c  $trend_c1 $head_cb if dm_urban==0 & age_months>24 & age_months<=60 & oblast_int>=3, robust cluster(child_y_birth)               
			outreg2 using "$out_folder\Table11.xls", dec(3) cttop(HAZ: 25-60)
			estimates store m13, title(HAZ: 25-60m)

		****

		xi: quietly reg waz06 $child_c $year_c  $trend_c1 $head_cb if dm_urban==0 & age_months<=60 & oblast_int>=3, robust cluster(child_y_birth)
			outreg2 using "$out_folder\Table11.xls", dec(3) cttop(WAZ: 0-60)
			estimates store m21, title(WAZ: 0-60m)
			

		xi: quietly reg waz06 $child_c $year_c  $trend_c1 $head_cb if dm_urban==0 & age_months<=24 & oblast_int>=3, robust cluster(child_y_birth)               
			outreg2 using "$out_folder\Table11.xls", dec(3) cttop(WAZ: 0-24)
			estimates store m22, title(WAZ: 0-24m)

			
		xi: quietly reg waz06 $child_c $year_c  $trend_c1 $head_cb if dm_urban==0 & age_months>24 & age_months<=60 & oblast_int>=3, robust cluster(child_y_birth)               
			outreg2 using "$out_folder\Table11.xls", dec(3) cttop(WAZ: 25-60)
			estimates store m23, title(WAZ: 25-60m)
			

	**TABLE 12 - URBAN ONLY** all urban kids

	*specify controls*
	global child_c ov_exposed1 child_fem

	*new trend - as Bishkek is now included as oblast dummy
	global trend_cu i.oblast i.age_months 
	global head_cb hhage hhfem hhmarried hh_e_kyrgyz hh_e_russian hh_e_uzbek
	
	set more off
	***
	xi: quietly reg hazall $child_c $year_c  $trend_cu $head_cb if dm_urban==1 & age_months<=60, robust cluster(child_y_birth)
	estimates store m1, title(HAZ: 0-60m)
	outreg2 using "$out_folder\Table12.xls", replace dec(3) cttop(HAZ: 0-60)

	xi: quietly reg hazall $child_c $year_c  $trend_cu $head_cb if dm_urban==1 & age_months<=24, robust cluster(child_y_birth)               
	estimates store m2, title(HAZ: 0-24m)
	outreg2 using "$out_folder\Table12.xls", dec(3) cttop(HAZ: 0-24)

	xi: quietly reg hazall $child_c $year_c  $trend_cu $head_cb if dm_urban==1 & age_months>24 & age_months<=60, robust cluster(child_y_birth)               
	estimates store m3, title(HAZ: 25-60m)
	outreg2 using "$out_folder\Table12.xls", dec(3) cttop(HAZ: 25-60)
	****

	xi: quietly reg waz06 $child_c $year_c  $trend_cu $head_cb if dm_urban==1 & age_months<=60, robust cluster(child_y_birth)
	estimates store m11, title(WAZ: 0-60m)
	outreg2 using "$out_folder\Table12.xls", dec(3) cttop(WAZ: 0-60)

	xi: quietly  reg waz06 $child_c $year_c  $trend_cu $head_cb if dm_urban==1 & age_months<=24, robust cluster(child_y_birth)               
	estimates store m12, title(WAZ: 0-24m)
	outreg2 using "$out_folder\Table12.xls", dec(3) cttop(WAZ: 0-24)

	xi: quietly  reg waz06 $child_c $year_c  $trend_cu $head_cb if dm_urban==1 & age_months>24 & age_months<=60, robust cluster(child_y_birth)               
	estimates store m13, title(WAZ: 25-60m)
		outreg2 using "$out_folder\Table12.xls", dec(3) cttop(WAZ: 25-60)


*****************
*APPENDIX TABLES: child level
*****************

	*TABLE A2 - robust to no hhd controls *

//define a set of controls: child/ hhd/ year of birth//
	global child_c ov_exposed child_fem  
	global trend_c ob3-ob7 i.age_months
	global year_c  surv96 surv97 surv98


	set more off

xi: quietly reg hazall $child_c $year_c  $trend_c  if dm_urban==0 & age_months<=60, robust cluster(child_y_birth)
estimates store m11, title(HAZ: 0-60m)
outreg2 using "$out_folder\TableA2.xls", replace dec(3) cttop(HAZ: 0-60)

xi: quietly reg hazall $child_c $year_c  $trend_c if dm_urban==0 & age_months<=24, robust cluster(child_y_birth)
estimates store m12, title(HAZ: 0-24m)
outreg2 using "$out_folder\TableA2.xls", dec(3) cttop(HAZ: 0-24)

xi:  quietly reg hazall $child_c $year_c  $trend_c if dm_urban==0 & age_months>25 & age_months<=60, robust cluster(child_y_birth)
estimates store m13, title(HAZ: 25-60m)
outreg2 using "$out_folder\TableA2.xls", dec(3) cttop(HAZ: 25-60)

**

xi: quietly  reg waz06 $child_c $year_c  $trend_c if dm_urban==0 & age_months<=60 , robust cluster(child_y_birth)
estimates store m21, title(WAZ: 0-60m)
outreg2 using "$out_folder\TableA2.xls", dec(3) cttop(WAZ: 0-60)

xi: quietly reg waz06 $child_c $year_c  $trend_c if dm_urban==0 & age_months<=24 , robust cluster(child_y_birth)
estimates store m22, title(WAZ: 0-25m)
outreg2 using "$out_folder\TableA2.xls", dec(3) cttop(WAZ: 0-24)

xi: quietly reg waz06 $child_c $year_c  $trend_c if dm_urban==0 & age_months>25 & age_months<=60 , robust cluster(child_y_birth)
estimates store m23, title(WAZ: 25-60m)
outreg2 using "$out_folder\TableA2.xls", dec(3) cttop(WAZ: 25-60)


*********************************************************************
* TABLE A3 - clustering at the year of birth and oblast interactions
*********************************************************************

//generating dummies//
	gen oblast_nb=oblast_int
	replace oblast_nb=. if oblast_int==1
	label var oblast_nb "oblast dummies, no Bishkek, as urban"
	
	tab oblast_nb, gen(d_obl)
	tab oblast_nb d_obl1
	tab child_y_birth, gen(d_cyb)

	*******
	*******
	*born in 1989 * oblast dummies
	
	gen ob1_89=1* d_obl1* d_cyb1
	gen ob2_89=2* d_obl2* d_cyb1
	gen ob3_89=3* d_obl3* d_cyb1
	gen ob4_89=4* d_obl4* d_cyb1
	gen ob5_89=5* d_obl5* d_cyb1
	gen ob6_89=6* d_obl6* d_cyb1
	**
	*born in 1990 * oblast dummies
	gen ob1_90=11* d_obl1* d_cyb2
	gen ob2_90=12* d_obl2* d_cyb2
	gen ob3_90=13* d_obl3* d_cyb2
	gen ob4_90=14* d_obl4* d_cyb2
	gen ob5_90=15* d_obl5* d_cyb2
	gen ob6_90=16* d_obl6* d_cyb2
	**
	*born in 1991 * oblast dummies
	gen ob1_91=21* d_obl1* d_cyb3
	gen ob2_91=22* d_obl2* d_cyb3
	gen ob3_91=23* d_obl3* d_cyb3
	gen ob4_91=24* d_obl4* d_cyb3
	gen ob5_91=25* d_obl5* d_cyb3
	gen ob6_91=26* d_obl6* d_cyb3
	**
	*born in 1992 * oblast dummies
	gen ob1_92=31* d_obl1* d_cyb4
	gen ob2_92=32* d_obl2* d_cyb4
	gen ob3_92=33* d_obl3* d_cyb4
	gen ob4_92=34* d_obl4* d_cyb4
	gen ob5_92=35* d_obl5* d_cyb4
	gen ob6_92=36* d_obl6* d_cyb4
	**
	*born in 1993 * oblast dummies
	gen ob1_93=41* d_obl1* d_cyb5
	gen ob2_93=42* d_obl2* d_cyb5
	gen ob3_93=43* d_obl3* d_cyb5
	gen ob4_93=44* d_obl4* d_cyb5
	gen ob5_93=45* d_obl5* d_cyb5
	gen ob6_93=46* d_obl6* d_cyb5
	**
	*born in 1994 * oblast dummies
	gen ob1_94=51* d_obl1* d_cyb6
	gen ob2_94=52* d_obl2* d_cyb6
	gen ob3_94=53* d_obl3* d_cyb6
	gen ob4_94=54* d_obl4* d_cyb6
	gen ob5_94=55* d_obl5* d_cyb6
	gen ob6_94=56* d_obl6* d_cyb6
	
	*born in 1995 * oblast dummies*
	gen ob1_95=61* d_obl1* d_cyb7
	gen ob2_95=62* d_obl2* d_cyb7
	gen ob3_95=63* d_obl3* d_cyb7
	gen ob4_95=64* d_obl4* d_cyb7
	gen ob5_95=65* d_obl5* d_cyb7
	gen ob6_95=66* d_obl6* d_cyb7
	**
	*born in 1996 * oblast dummies
	gen ob1_96=71* d_obl1* d_cyb8
	gen ob2_96=72* d_obl2* d_cyb8
	gen ob3_96=73* d_obl3* d_cyb8
	gen ob4_96=74* d_obl4* d_cyb8
	gen ob5_96=75* d_obl5* d_cyb8
	gen ob6_96=76* d_obl6* d_cyb8
	**
	*born in 1997 * oblast dummies
	gen ob1_97=81* d_obl1* d_cyb9
	gen ob2_97=82* d_obl2* d_cyb9
	gen ob3_97=83* d_obl3* d_cyb9
	gen ob4_97=84* d_obl4* d_cyb9
	gen ob5_97=85* d_obl5* d_cyb9
	gen ob6_97=86* d_obl6* d_cyb9
	**
	*born in 1998 * oblast dummies
	gen ob1_98=91* d_obl1* d_cyb10
	gen ob2_98=92* d_obl2* d_cyb10
	gen ob3_98=93* d_obl3* d_cyb10
	gen ob4_98=94* d_obl4* d_cyb10
	gen ob5_98=95* d_obl5* d_cyb10
	gen ob6_98=96* d_obl6* d_cyb10
************************************************************************************************

     gen newv2= ob1_89 + ob2_89 + ob3_89 + ob4_89 + ob5_89 + ob6_89 + ///
				ob1_90+  ob2_90 + ob3_90 + ob4_90 + ob5_90 + ob6_90 + ///
				ob1_91+  ob2_91 + ob3_91 + ob4_91 + ob5_91 + ob6_91 + ///
				ob1_92+  ob2_92 + ob3_92 + ob4_92 + ob5_92 + ob6_92 + ///
				ob1_93+  ob2_93 + ob3_93 + ob4_93 + ob5_93 + ob6_93 + ///
				ob1_94+  ob2_94 + ob3_94 + ob4_94 + ob5_94 + ob6_94 + ///
				ob1_95+  ob2_95 + ob3_95 + ob4_95 + ob5_95 + ob6_95 + ///
				ob1_96+  ob2_96 + ob3_96 + ob4_96 + ob5_96 + ob6_96 + ///
				ob1_97+  ob2_97 + ob3_97 + ob4_97 + ob5_97 + ob6_97 + ///
				ob1_98+  ob2_98 + ob3_98 + ob4_98 + ob5_98 + ob6_98
	

*******************************************************************************
//Table A3 - clusering at oblast and year birth interaction
*******************************************************************************
	set more off
		
	//define a set of controls: child/ hhd/ year of birth//
	global child_c ov_exposed child_fem  
	global trend_c ob3-ob7 i.age_months
	global year_c  surv96 surv97 surv98
	global head_cb hhage hhfem hhmarried hh_e_kyrgyz hh_e_russian hh_e_uzbek

***HAZ***
xi: quietly reg hazall $child_c $year_c  $trend_c $head_cb   if dm_urban==0 & age_months<=60, robust cluster(newv2)
			outreg2 using "$out_folder\TableA3_obl_cluster.xls", replace dec(3) cttop(HAZ)
			estimates store m11, title(HAZ: 0-60m)
		
xi: quietly reg hazall $child_c $year_c  $trend_c $head_cb  if dm_urban==0 & age_months<=24, robust cluster(newv2)
			outreg2 using "$out_folder\TableA3_obl_cluster.xls", dec(3) cttop(HAZ)
			estimates store m12, title(HAZ: 0-24m)

xi: quietly  reg hazall $child_c $year_c  $trend_c $head_cb   if dm_urban==0 & age_months>24 & age_months<=60, robust cluster(newv2)
			outreg2 using "$out_folder\TableA3_obl_cluster.xls", dec(3) cttop(HAZ)
			estimates store m13, title(HAZ: 25-60m)
***WAZ***

xi: quietly reg waz06 $child_c $year_c  $trend_c $head_cb  if dm_urban==0 & age_months<=60, robust cluster(newv2)
			outreg2 using "$out_folder\TableA3_obl_cluster.xls", dec(3) cttop(WAZ)
			estimates store m21, title(WAZ: 0-60m)

xi: quietly reg waz06 $child_c $year_c  $trend_c $head_cb  if dm_urban==0 & age_months<=24, robust cluster(newv2)
			outreg2 using "$out_folder\TableA3_obl_cluster.xls", dec(3) cttop(WAZ)
			estimates store m22, title(WAZ: 0-24m)

xi: quietly  reg waz06 $child_c $year_c  $trend_c $head_cb  if dm_urban==0 & age_months>24 & age_months<=60, robust cluster(newv2)
			outreg2 using "$out_folder\TableA3_obl_cluster.xls", dec(3) cttop(WAZ)
			estimates store m23, title(WAZ: 25-60m)


***************************************************************************************************************
* Table A4 - bootstrapped se - like Table 4 - baseline
***************************************************************************************************************

	//define a set of controls: child/ hhd/ year of birth//
	global child_c ov_exposed child_fem  
	global trend_c ob3-ob7 i.age_months
	global year_c  surv96 surv97 surv98

//define a set of controls: child/ hhd/ year of birth//
global head_cb hhage hhfem hhmarried hh_e_kyrgyz hh_e_russian hh_e_uzbek
	
xi: quietly reg hazall $child_c $year_c  $trend_c $head_cb if dm_urban==0 & age_months<=60, ///
	vce(boot, cluster(child_y_birth)  reps(50) seed(1234) nodots) 
		outreg2 using "$out_folder\TableA4_boot_year.xls", replace dec(3) cttop(HAZ)

xi: quietly reg hazall $child_c $year_c  $trend_c $head_cb if dm_urban==0 & age_months<=24, ///
	vce(boot, cluster(child_y_birth)  reps(50) seed(1234) nodots) 
		outreg2 using "$out_folder\TableA4_boot_year.xls", dec(3) cttop(HAZ)

xi: quietly reg hazall $child_c $year_c  $trend_c $head_cb if dm_urban==0 & age_months>24 & age_months<=60, ///
	vce(boot, cluster(child_y_birth)  reps(50) seed(1234) nodots) 
		outreg2 using "$out_folder\TableA4_boot_year.xls", dec(3) cttop(HAZ)
****

xi: quietly reg waz06 $child_c $year_c  $trend_c $head_cb if dm_urban==0 & age_months<=60, ///
	vce(boot, cluster(child_y_birth)  reps(50) seed(1234) nodots) 
		outreg2 using "$out_folder\TableA4_boot_year.xls", dec(3) cttop(WAZ)

xi: quietly reg waz06 $child_c $year_c  $trend_c $head_cb if dm_urban==0 & age_months<=24, ///
	vce(boot, cluster(child_y_birth)  reps(50) seed(1234) nodots) 
		outreg2 using "$out_folder\TableA4_boot_year.xls", dec(3) cttop(WAZ)

xi: quietly reg waz06 $child_c $year_c  $trend_c $head_cb if dm_urban==0 & age_months>24 & age_months<=60, ///
	vce(boot, cluster(child_y_birth)  reps(50) seed(1234) nodots) 
		outreg2 using "$out_folder\TableA4_boot_year.xls", dec(3) cttop(WAZ)
		
		
*****************************************************	
**TABLE A5 - LOGGED VALUE OF EXPOSURE TO LAND REFORM
*****************************************************
set more off

gen log_exp=ln(ov_exposed+0.001)

//define a set of controls: child/ hhd/ year of birth//
global child_c1 log_exp child_fem  
global trend_c ob3-ob7 i.age_months
global year_c  surv96 surv97 surv98
global head_cb hhage hhfem hhmarried hh_e_kyrgyz hh_e_russian hh_e_uzbek

xi: quietly reg hazall $child_c1 $year_c  $trend_c $head_cb if dm_urban==0 & age_months<=60, robust cluster(child_y_birth)
estimates store m1, title(HAZ: 0-60m)
outreg2 using "$out_folder\TableA5.xls", replace dec(3) cttop(HAZ)

xi: quietly  reg hazall $child_c1 $year_c  $trend_c $head_cb if dm_urban==0 & age_months<=24, robust cluster(child_y_birth)               
estimates store m2, title(HAZ: 0-24m)
outreg2 using "$out_folder\TableA5.xls", dec(3) cttop(HAZ)

xi: quietly reg hazall $child_c1 $year_c  $trend_c $head_cb if dm_urban==0 & age_months>24 & age_months<=60, robust cluster(child_y_birth)               
estimates store m3, title(HAZ: 25-60m)
outreg2 using "$out_folder\TableA5.xls", dec(3) cttop(HAZ)
****

xi: quietly reg waz06 $child_c1 $year_c  $trend_c $head_cb if dm_urban==0 & age_months<=60, robust cluster(child_y_birth)
estimates store m11, title(WAZ: 0-60m)
outreg2 using "$out_folder\TableA5.xls", dec(3) cttop(WAZ)

xi: quietly reg waz06 $child_c1 $year_c  $trend_c $head_cb if dm_urban==0 & age_months<=24, robust cluster(child_y_birth)               
estimates store m12, title(WAZ: 0-24m)
outreg2 using "$out_folder\TableA5.xls", dec(3) cttop(WAZ)

xi: quietly reg waz06 $child_c1 $year_c  $trend_c $head_cb if dm_urban==0 & age_months>24 & age_months<=60, robust cluster(child_y_birth)               
estimates store m13, title(WAZ: 25-60m)
outreg2 using "$out_folder\TableA5.xls", dec(3) cttop(WAZ)


****************************************************************************************
* Table A6: Effect of exposure to land privatization on child anthropometrics, with modifications to reform date (+/- one year)
* Panel A - forward
****************************************************************************************
set more off
*new controls for exposure
global child_f ov_exp_fwd child_fem
global trend_c ob3-ob7 i.age_months
global head_cb hhage hhfem hhmarried hh_e_kyrgyz hh_e_russian hh_e_uzbek

* HAZ
xi: quietly reg hazall $child_f $year_c  $trend_c $head_cb if dm_urban==0 & age_months<=60, robust cluster(child_y_birth)
estimates store m11, title(HAZ: 0-60)
outreg2 using "$out_folder\TableA6_panel_A.xls", replace dec(3) cttop(HAZ)

xi: quietly reg hazall $child_f $year_c  $trend_c $head_cb if dm_urban==0 & age_months<=24 , robust cluster(child_y_birth)
estimates store m12, title(HAZ: 0-24)
outreg2 using "$out_folder\TableA6_panel_A.xls", dec(3) cttop(HAZ)

xi: quietly reg hazall $child_f $year_c  $trend_c $head_cb if dm_urban==0 & age_months>25 & age_months<=60 , robust cluster(child_y_birth)
estimates store m13, title(HAZ: 25-60)
outreg2 using "$out_folder\TableA6_panel_A.xls",  dec(3) cttop(HAZ)

* WAZ
xi: quietly  reg waz06 $child_f $year_c  $trend_c $head_cb if dm_urban==0 & age_months<=60, robust cluster(child_y_birth)
estimates store m21, title(WAZ: 0-60)
outreg2 using "$out_folder\TableA6_panel_A.xls",  dec(3) cttop(WAZ)

xi: quietly reg waz06 $child_f $year_c  $trend_c $head_cb if dm_urban==0 & age_months<=24 , robust cluster(child_y_birth)
estimates store m22, title(WAZ: 0-24)
outreg2 using "$out_folder\TableA6_panel_A.xls",  dec(3) cttop(WAZ)

xi: quietly reg waz06 $child_f $year_c  $trend_c $head_cb if dm_urban==0 & age_months>25 & age_months<=60 , robust cluster(child_y_birth)
estimates store m23, title(WAZ: 25-60)
outreg2 using "$out_folder\TableA6_panel_A.xls",  dec(3) cttop(WAZ)


*****************************************************************************
* Table A6: Effect of exposure to land privatization on child anthropometrics, with modifications to reform date (+/- one year)
* Panel B - backwards
*****************************************************************************

set more off
*new controls - for exposure
global child_b ov_exp_bwd child_fem
global trend_c ob3-ob7 i.age_months
global head_cb hhage hhfem hhmarried hh_e_kyrgyz hh_e_russian hh_e_uzbek

* HAZ
xi: quietly reg hazall $child_b $year_c  $trend_c $head_cb if dm_urban==0 & age_months<=60, robust cluster(child_y_birth)
estimates store m11, title(HAZ: 0-60)
outreg2 using "$out_folder\TableA6_panel_B.xls", replace dec(3) cttop(HAZ)

xi: quietly reg hazall $child_b $year_c  $trend_c $head_cb if dm_urban==0 & age_months<=24 , robust cluster(child_y_birth)
estimates store m12, title(HAZ: 0-24)
outreg2 using "$out_folder\TableA6_panel_B.xls", dec(3) cttop(HAZ)

xi: quietly reg hazall $child_b $year_c  $trend_c $head_cb if dm_urban==0 & age_months>25 & age_months<=60 , robust cluster(child_y_birth)
estimates store m13, title(HAZ: 25-60)
outreg2 using "$out_folder\TableA6_panel_B.xls", dec(3) cttop(HAZ)

* WAZ
xi: quietly reg waz06 $child_b $year_c  $trend_c $head_cb if dm_urban==0 & age_months<=60, robust cluster(child_y_birth)
estimates store m21, title(WAZ: 0-60)
outreg2 using "$out_folder\TableA6_panel_B.xls", dec(3) cttop(WAZ)

xi: quietly reg waz06 $child_b $year_c  $trend_c $head_cb if dm_urban==0 & age_months<=24 , robust cluster(child_y_birth)
estimates store m22, title(WAZ: 0-24)
outreg2 using "$out_folder\TableA6_panel_B.xls", dec(3) cttop(WAZ)

xi: quietly  reg waz06 $child_b $year_c  $trend_c $head_cb if dm_urban==0 & age_months>25 & age_months<=60 , robust cluster(child_y_birth)
estimates store m23, title(WAZ: 25-60)
outreg2 using "$out_folder\TableA6_panel_B.xls", dec(3) cttop(WAZ)


***************************
* TABLE A8 - NO 1996 DATA
***************************
set more off

	global child_c ov_exposed child_fem  
	global trend_c  i.age_months ob3-ob7 
	global year_c1   surv97 surv98

	
xi: quietly reg hazall $child_c $year_c1  $trend_c $head_cb if dm_urban==0 & age_months<=60 & no96==1 , robust cluster(child_y_birth)
estimates store m1, title(HAZ: 0-60m)
outreg2 using "$out_folder\TableA8_no_1996.xls", replace dec(3) cttop(HAZ)

xi: quietly reg hazall $child_c $year_c1  $trend_c $head_cb if dm_urban==0 & age_months<=24 & no96==1, robust cluster(child_y_birth)               
estimates store m2, title(HAZ: 0-24m)
outreg2 using "$out_folder\TableA8_no_1996.xls", dec(3) cttop(HAZ)

xi: quietly  reg hazall $child_c $year_c1  $trend_c $head_cb if dm_urban==0 & age_months>24 & age_months<=60 & no96==1, robust cluster(child_y_birth)               
estimates store m3, title(HAZ: 25-60m)
outreg2 using "$out_folder\TableA8_no_1996.xls", dec(3) cttop(HAZ)
****

xi: quietly  reg waz06 $child_c $year_c1  $trend_c $head_cb if dm_urban==0 & age_months<=60 & no96==1, robust cluster(child_y_birth)
estimates store m11, title(WAZ: 0-60m)
outreg2 using "$out_folder\TableA8_no_1996.xls", dec(3) cttop(WAZ)

xi: quietly  reg waz06 $child_c $year_c1  $trend_c $head_cb if dm_urban==0 & age_months<=24 & no96==1, robust cluster(child_y_birth)               
estimates store m12, title(WAZ: 0-24m)
outreg2 using "$out_folder\TableA8_no_1996.xls", dec(3) cttop(WAZ)

xi: quietly  reg waz06 $child_c $year_c1  $trend_c $head_cb if dm_urban==0 & age_months>24 & age_months<=60 & no96==1, robust cluster(child_y_birth)               
estimates store m13, title(WAZ: 25-60m)
outreg2 using "$out_folder\TableA8_no_1996.xls", dec(3) cttop(WAZ)


*PLACEHOLDER - COMMUNITY CONTROL MEANS - SUMMARY TABLE

*******************************************************************************
* TABLE A9 - urban fully interacted with urban sample
*******************************************************************************


set more off
//define a set of controls: child/ hhd/ year of birth//
global year_c   surv96 surv97 surv98
global year_c1   surv97 surv98
global head_cb hhage hhfem hhmarried hh_e_kyrgyz hh_e_russian hh_e_uzbek
global child_c ov_exposed1 child_fem  
global trend_c i.age_months i.oblast_int surv96 surv97 surv98

***********************
* macros for variables
***********************
tab age_months, gen(cha_)

tab oblast_int, gen(obld_)

//dummies for age in months//
global chadm cha_*

***** create interaction terms with child age in months dummies***
foreach var of varlist cha_* {
gen intc_`var' = dm_urban*`var'
}

***** create interaction terms with oblast dummies***
foreach var of varlist obld_* {
gen intc_`var' = dm_urban*`var'
}


** create interactions with hhd variables**
foreach var in ov_exposed1 child_fem hhage hhfem hhmarried hh_e_kyrgyz hh_e_russian hh_e_uzbek surv96 surv97 surv98 {
gen int_`var' = dm_urban*`var'
}

global inter_ur int_ov_exposed1 int_child_fem int_hhage int_hhfem int_hhmarried int_hh_e_kyrgyz int_hh_e_russian int_hh_e_uzbek int_surv96 int_surv97 int_surv98
global trend_c i.oblast_int surv96 surv97 surv98 

//adding child and urban interactions//
global child_60 cha_2-cha_61 
global child_24 cha_2-cha_24 
global child_25 cha_27-cha_61 

global child_int60 intc_cha_2-intc_cha_61
global child_int24 intc_cha_2-intc_cha_24
global child_int25 intc_cha_27-intc_cha_61

* adding oblast interactions*
global region obld_2 obld_3 obld_4 obld_5 obld_6 obld_7
global region_int intc_obld_2 intc_obld_3 intc_obld_4 intc_obld_5 intc_obld_6 intc_obld_7

global trend_c surv96 surv97 surv98 

sum $trend_c
sum $inter_ur
sum $child_c
sum $region $region_int
sum $child_int60

label var int_ov_exposed "Overall exposed*Urban"


set more off

*** HAZ
xi: quietly reg hazall $child_c dm_urban  $trend_c $head_cb $inter_ur $child_60 $child_int60 $region $region_int if age_months<=60, robust cluster(child_y_birth)
testparm $inter_ur $region_int $child_int60 dm_urban
estadd scalar F_diff = r(F), replace
estadd scalar p_diff = r(p), replace
estimates store m1, title(HAZ: 0-60)
outreg2 using "$out_folder\TableA9_urban_fully_interacted.xls", replace dec(3) cttop(HAZ)

xi: quietly reg hazall $child_c dm_urban  $trend_c $head_cb $inter_ur $child_24 $child_int24 $region $region_int if age_months<=24, robust cluster(child_y_birth)
testparm $inter_ur $region_int $child_int24 dm_urban
estadd scalar F_diff = r(F), replace
estadd scalar p_diff = r(p), replace
estimates store m2, title(HAZ:0-24)
outreg2 using "$out_folder\TableA9_urban_fully_interacted.xls", dec(3) cttop(HAZ)

xi: quietly reg hazall $child_c dm_urban  $trend_c $head_cb $inter_ur $child_25 $child_int25 $region $region_int if age_months>24 & age_months<=60, robust cluster(child_y_birth)
testparm $inter_ur $region_int $child_int25 dm_urban
estadd scalar F_diff = r(F), replace
estadd scalar p_diff = r(p), replace
estimates store m3, title(HAZ: 25-60)
outreg2 using "$out_folder\TableA9_urban_fully_interacted.xls", dec(3) cttop(HAZ)

*** WAZ
xi:  quietly reg waz06 $child_c dm_urban  $trend_c $head_cb $inter_ur $child_60 $child_int60 $region $region_int if age_months<=60, robust cluster(child_y_birth)
testparm $inter_ur $region_int $child_int60 dm_urban
estadd scalar F_diff = r(F), replace
estadd scalar p_diff = r(p), replace
estimates store m21, title(WAZ: 0-60)
outreg2 using "$out_folder\TableA9_urban_fully_interacted.xls", dec(3) cttop(WAZ)

xi: quietly reg waz06 $child_c dm_urban  $trend_c $head_cb $inter_ur $child_24 $child_int24 $region $region_int if age_months<=24, robust cluster(child_y_birth)
testparm $inter_ur $region_int $child_int24 dm_urban
estadd scalar F_diff = r(F), replace
estadd scalar p_diff = r(p), replace
estimates store m22, title(WAZ: 0-24)
outreg2 using "$out_folder\TableA9_urban_fully_interacted.xls", dec(3) cttop(WAZ)

xi: quietly  reg waz06 $child_c dm_urban  $trend_c $head_cb $inter_ur $child_25 $child_int25 $region $region_int if age_months>24 & age_months<=60, robust cluster(child_y_birth)
testparm $inter_ur $region_int $child_int25 dm_urban
estadd scalar F_diff = r(F), replace
estadd scalar p_diff = r(p), replace
estimates store m23, title(WAZ: 25-60)
outreg2 using "$out_folder\TableA9_urban_fully_interacted.xls", dec(3) cttop(WAZ)

	






